import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)
import Layout from '@/components/layout/index.vue'
const routes = [
  {
    path: '/setShop',
    name: 'SetShop',
    component: () => import('../views/setShop/index.vue')
  },
  {
    path: '/tab',
    name: 'Tab',
    component: () => import('@/views/tab.vue')
  },
  {
    path: '/check',
    name: 'Check',
    component: () => import('@/views/checkOut/index.vue')
  },
  {
    path: '/comment',
    name: 'Comment',
    component: () => import('@/views/comment/index.vue')
  },
  {
    path: '/modal',
    name: 'modal',
    component: () => import('@/views/modal/index.vue')
  },
  {
    path: '',
    name: 'Layout',
    component: Layout,
    children: [
      {
        path: '/home',
        name: 'Home',
        component: () => import('@/views/shop/index.vue'),
      },{
        path: '/lease',
        name: 'Lease',
        component: () => import('@/views/lease/index.vue'),
      },{
        path: '/lease/order',
        name: 'LeaseOrder',
        component: () => import('@/views/lease/order.vue'),
      },{
        path: '/guess',
        name: 'guess',
        component: () => import('@/views/guess/index.vue'),
      },{
        path: '/sigIn',
        name: 'sigIn',
        component: () => import('@/views/signIn/index.vue'),
      },{
        path: '/sigIn/record',
        name: 'sigInRecord',
        component: () => import('@/views/signIn/record.vue'),
      },{
        path: '/wallet',
        name: 'wallet',
        component: () => import('@/views/wallet/index.vue'),
      },{
        path: '/wallet/consumeRecord',
        name: 'consumeRecord',
        component: () => import('@/views/wallet/consumeRecord/index.vue'),
      },{
        path: '/wallet/coupon',
        name: 'coupon',
        component: () => import('@/views/wallet/coupon/index.vue'),
      },{
        path: '/like',
        name: 'like',
        component: () => import('@/views/like/index.vue'),
      },{
        path: '/like/home',
        name: 'like',
        component: () => import('@/views/like/home.vue'),
      },
    ]
  }
]

const router = new VueRouter({
  mode: 'hash',
  routes
})

export default router
